#初始化
title @s times 0t 3s 10t
execute as @a[tag=dayshower_show_day] run scoreboard players set @s dayshower_settings 0
execute as @a[tag=dayshower_show_day] run scoreboard players set @s dayshower_show_day 1
execute as @a[tag=dayshower_show_day] run tag @s remove dayshower_show_day

#显示效果（非格式化）
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar {"text": "----","bold": true}
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar {"text": "--  --","bold": true}
execute as @a[scores={dayshower_show_day=4}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"translate":"第"},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=5}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"translate":"第"},{"text": "  "},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"translate":"第"},{"text": "  "},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--"},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"},"obfuscated": true},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=7}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"}},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 0 run title @s actionbar [{"text": "--","bold": true},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"}},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title {"text": "----"}
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title {"text": "--  --"}
execute as @a[scores={dayshower_show_day=4}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"translate":"第"},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=5}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"translate":"第"},{"text": "  "},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"translate":"第"},{"text": "  "},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"},"obfuscated": true},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=7}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"}},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 0 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 0 run title @s title [{"text": "--"},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"}},{"translate":"天"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_format matches 0 if score @s dayshower_tellraw matches 1 run tellraw @s [{"text": "----","bold": true},{"translate":"第"},{"score":{"name": "*","objective": "dayshower_day"}},{"translate":"天"},{"text": "----"}]

#显示效果（格式化）
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar {"text": "----","bold": true}
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar {"text": "--  --","bold": true}
execute as @a[scores={dayshower_show_day=4}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"translate":"年"},{"translate":"月"},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=5}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"text": "  "},{"translate":"年"},{"text": "  "},{"translate":"月"},{"text": "  "},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"text": "  "},{"translate":"年"},{"text": "  "},{"translate":"月"},{"text": "  "},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"score":{"name": "*","objective": "dayshower_year"},"obfuscated": true},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"},"obfuscated": true},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"},"obfuscated": true},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=7}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 run title @s actionbar [{"text": "--","bold": true},{"score":{"name": "*","objective": "dayshower_year"}},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"}},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"}},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 0 run title @s actionbar [{"text": "--","bold": true},{"score":{"name": "*","objective": "dayshower_year"}},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"}},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"}},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title {"text": "----"}
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title {"text": "--  --"}
execute as @a[scores={dayshower_show_day=4}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"translate":"年"},{"translate":"月"},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=5}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"text": "  "},{"translate":"年"},{"text": "  "},{"translate":"月"},{"text": "  "},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"text": "  "},{"translate":"年"},{"text": "  "},{"translate":"月"},{"text": "  "},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=6}] if score @s dayshower_animation_obfuscated matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--","bold": true},{"score":{"name": "*","objective": "dayshower_year"},"obfuscated": true},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"},"obfuscated": true},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"},"obfuscated": true},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=7}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 run title @s title [{"text": "--"},{"score":{"name": "*","objective": "dayshower_year"}},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"}},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"}},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_always_show matches 0 if score @s dayshower_format matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 0 run title @s title [{"text": "--"},{"score":{"name": "*","objective": "dayshower_year"}},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"}},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"}},{"translate":"日"},{"text": "--"}]
execute as @a[scores={dayshower_show_day=1}] if score @s dayshower_format matches 1 if score @s dayshower_tellraw matches 1 run tellraw @s [{"text": "--","bold": true},{"score":{"name": "*","objective": "dayshower_year"}},{"translate":"年"},{"score":{"name": "*","objective": "dayshower_month"}},{"translate":"月"},{"score":{"name": "*","objective": "dayshower_storge_2"}},{"translate":"日"},{"text": "--"}]

#声音控制
execute as @a[scores={dayshower_show_day=1..2}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=4..6}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=1..2}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=4..6}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=7}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound entity.player.levelup master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_flash matches 0 if score @s dayshower_sounds matches 1 run playsound entity.player.levelup master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 1 unless score @s dayshower_actionbar matches 1 unless score @s dayshower_title matches 1 if score @s dayshower_sounds matches 1 run playsound entity.player.levelup master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 1 if score @s dayshower_always_show matches 1 run playsound entity.player.levelup master @s
execute as @a[scores={dayshower_show_day=7}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 1 if score @s dayshower_flash matches 0 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 1 unless score @s dayshower_actionbar matches 1 unless score @s dayshower_title matches 1 if score @s dayshower_sounds matches 1 run playsound entity.experience_orb.pickup master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 1 if score @s dayshower_always_show matches 1 run playsound entity.experience_orb.pickup master @s

execute as @a[scores={dayshower_show_day=1..2}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=4..6}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_actionbar matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=1..2}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=4..6}] at @s if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_title matches 1 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=7}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound block.end_portal.spawn master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_flash matches 0 if score @s dayshower_sounds matches 1 run playsound block.end_portal.spawn master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 2 unless score @s dayshower_actionbar matches 1 unless score @s dayshower_title matches 1 if score @s dayshower_sounds matches 1 run playsound block.end_portal.spawn master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 1 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 2 if score @s dayshower_always_show matches 1 run playsound block.end_portal.spawn master @s
execute as @a[scores={dayshower_show_day=7}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_flash matches 1 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_always_show matches 0 if score @s dayshower_sound_style matches 2 if score @s dayshower_flash matches 0 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 2 unless score @s dayshower_actionbar matches 1 unless score @s dayshower_title matches 1 if score @s dayshower_sounds matches 1 run playsound item.trident.thunder master @s
execute as @a[scores={dayshower_show_day=1}] at @s if score @s dayshower_last_sounds matches 0 if score @s dayshower_tellraw matches 1 if score @s dayshower_sound_style matches 2 if score @s dayshower_always_show matches 1 run playsound item.trident.thunder master @s

#计分板修改与重置
execute as @a[scores={dayshower_show_day=1..7}] run scoreboard players add @s dayshower_show_day 1
execute as @a[scores={dayshower_show_day=8..}] if score @s dayshower_flash matches 1 run scoreboard players set @s dayshower_show_day 0
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_flash matches 0 if score @s dayshower_actionbar matches 0 if score @s dayshower_title matches 0 run scoreboard players set @s dayshower_show_day 0
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_tellraw matches 1 if score @s dayshower_actionbar matches 0 if score @s dayshower_title matches 0 run scoreboard players set @s dayshower_show_day 0
execute as @a[scores={dayshower_show_day=2}] if score @s dayshower_always_show matches 1 run scoreboard players set @s dayshower_show_day 0

#重复执行
execute if entity @a[scores={dayshower_show_day=1..7}] run schedule function dayshower:system/show_day 10t